load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "server.go",
        "socket_listener.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/network/dhcp/server",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/network/dns:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/github.com/krolaw/dhcp4:go_default_library",
        "//vendor/github.com/krolaw/dhcp4/conn:go_default_library",
        "//vendor/github.com/vishvananda/netlink:go_default_library",
        "//vendor/golang.org/x/net/ipv4:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "server_suite_test.go",
        "server_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/krolaw/dhcp4:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/github.com/vishvananda/netlink:go_default_library",
    ],
)
